import { request } from '@/utils/request';

// 根据关键字查询产品信息
export function productqueryProductByKey(data) {
  return request(
    {
      url: '/product/queryProductByKey',
      method: 'POST',
      data
    },
    { toast: false }
  );
}

// 发布线索
export function cluerelease(data) {
  return request({
    url: '/clue/release',
    method: 'POST',
    data
  });
}

// 线索列表
export function cluegetCluePage(data) {
  return request(
    {
      url: '/clue/getCluePage',
      method: 'POST',
      data
    },
    { toast: false }
  );
}
// 线索列表数量
export function cluegetClueStatusCount(data) {
  return request(
    {
      url: '/clue/getClueStatusCount',
      method: 'POST',
      data
    },
    { loading: false, toast: false }
  );
}

// 线索详情
export function cluegetClueDetail(data) {
  return request(
    {
      url: '/clue/getClueDetail',
      method: 'POST',
      data
    },
    { toast: false }
  );
}

// 线索投诉
export function cluecomplaint(data) {
  return request({
    url: '/clue/complaint',
    method: 'POST',
    data
  });
}

// 线索跟进
export function cluefollowUp(data) {
  return request({
    url: '/clue/followUp',
    method: 'POST',
    data
  });
}

// 线索签约
export function cluesign(data) {
  return request({
    url: '/clue/sign',
    method: 'POST',
    data
  });
}

// 线索返佣
export function cluerebate(data) {
  return request({
    url: '/clue/rebate',
    method: 'POST',
    data
  });
}

// 线索电话接单
export function cluephoneReceive(data) {
  return request({
    url: '/clue/phoneReceive',
    method: 'POST',
    data
  });
}

// 线索接单
export function cluereceive(data) {
  return request({
    url: '/clue/receive',
    method: 'POST',
    data
  });
}

// 线索拒绝接单
export function cluerejectReceive(data) {
  return request({
    url: '/clue/rejectReceive',
    method: 'POST',
    data
  });
}

// 线索投诉列表
export function cluegetComplaintPage(data) {
  return request(
    {
      url: '/clue/getComplaintPage',
      method: 'POST',
      data
    },
    { toast: false }
  );
}

// 线索投诉列表数量
export function cluegetComplaintStatusCount(data) {
  return request(
    {
      url: '/clue/getComplaintStatusCount',
      method: 'POST',
      data
    },
    { loading: false, toast: false }
  );
}

// 线索投诉详情
export function cluegetComplaintDetail(data) {
  return request(
    {
      url: '/clue/getComplaintDetail',
      method: 'POST',
      data
    },
    { toast: false }
  );
}
